package com.moloon.game.sanguo.editor.propseditor.view.mission;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.SectionPart;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.Section;

public class MissionGrantSection extends SectionPart {

	private Text text_1;
	private Text text;
	/**
	 * Create the SectionPart
	 * @param parent
	 * @param toolkit
	 * @param style
	 */
	public MissionGrantSection(Composite parent, FormToolkit toolkit,
			int style) {
		super(parent, toolkit, style);
		createClient(getSection(), toolkit);
	}

	/**
	 * Fill the section
	 */
	private void createClient(Section section, FormToolkit toolkit) {
		section.setText("任务授予");
		Composite container = toolkit.createComposite(section);
		final GridLayout gridLayout = new GridLayout();
		gridLayout.numColumns = 3;
		container.setLayout(gridLayout);
		//
		section.setClient(container);

		toolkit.createLabel(container, "授予任务NPC:", SWT.NONE);

		text = toolkit.createText(container, null, SWT.NONE);
		text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

		toolkit.createHyperlink(container, "选择", SWT.NONE);

		final Label label = toolkit.createLabel(container, "授予任务时对话内容:", SWT.NONE);
		label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1));

		text_1 = toolkit.createText(container, null, SWT.WRAP | SWT.V_SCROLL);
		text_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
		text_1.setText("你可以通过*键切换小地图和场景聊天界面。屏幕左下方的小地图可了解NPC的位置！");
	}

}
